package cn.fintecher.pangolin.entity.elastic;

import cn.fintecher.pangolin.common.enums.ImportDataExcelStatus;
import cn.fintecher.pangolin.common.enums.ImportTemplateType;
import cn.fintecher.pangolin.common.utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.Date;

/**
 * @Auther: xiaqun
 * @Description: 分案导入结果实体
 * @Date: 9:29 2019/10/18
 */

@Data
@Document(indexName = Constants.DISTRIBUTE_IMPORT_RECORD, type = Constants.DISTRIBUTE_IMPORT_RECORD, shards = 1, replicas = 0)
@ApiModel(value = "分案导入结果实体", description = "分案导入结果实体")
public class DistributeImportRecord {
    @Id
    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "批次号")
    private String batchNumber;

    @ApiModelProperty(value = "案件数量")
    private Integer totalNumber;

    @ApiModelProperty(value = "导入状态")
    private ImportDataExcelStatus status;

    @ApiModelProperty(value = "错误文件ID")
    private String fileId;

    @ApiModelProperty(value = "操作人")
    private String operator;

    @ApiModelProperty(value = "操作时间")
    private Date operateTime;

    public void process(String name, Date date) {
        this.operator = name;
        this.operateTime = date;
    }
}
